<?php

namespace app\modules\index\controllers;

use app\common\controllers\CorsController;
use app\modules\index\services\SearchService;

class SearchController extends CorsController{

    //搜索
    public function actionMerchant(){
        $name = \Yii::$app->getRequest()->get("name");
        $cat_id=\Yii::$app->getRequest()->get("cat_id");
        $lng_lat=\Yii::$app->getRequest()->get("lng_lat");
        $pagesize = \Yii::$app->getRequest()->get("pagesize");

        return [
            'list'=>SearchService::merchant($name,$cat_id,$lng_lat,$page,$pagesize),
            'page'=>$page->Out()
        ];
    }
}